package com.yonyou.cyxdms.basedata.service.controller.timetask;



import com.yonyou.cyxdms.basedata.service.service.feign.SendVehiclePriceService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Api(value = "产品主数据下发接口模拟定时任务调用", tags = "产品主数据下发接口")
@RestController
@Slf4j
@RequestMapping("/productPriceSend")
public class ProductPriceSendController {

    @Autowired
    private SendVehiclePriceService sendVehiclePriceService;

    @ApiOperation(value = "产品主数据下发")
    @PostMapping("/send")
    public void send() {
        sendVehiclePriceService.sendVehiclePriceToDms();
    }

    @ApiOperation(value = "产品主数据价格更新")
    @PostMapping("/update")
    public void update() {
        sendVehiclePriceService.updatePrice();
    }
}
